import elementResizeDetectorMaker from "element-resize-detector";
const erd = elementResizeDetectorMaker();
const resizeDirective = {
    bind(el, binding) { 
        erd.listenTo(el, (element) => {
            binding.value(element);
        })
    },
    unbind(el) {
        erd.uninstall(el);
    },
    update(el, binding) {
        // erd.removeAllListeners(el);
        // erd.listenTo(el, (element) => {
        //     binding.value(element);
        // })
    }
}

export default resizeDirective